package serveur;

import java.net.MalformedURLException;
import java.rmi.Naming;
import java.rmi.NotBoundException;
import java.rmi.RemoteException;
import java.rmi.server.UnicastRemoteObject;

@SuppressWarnings("serial")
public class Client extends UnicastRemoteObject implements ClientDistant {

	public Client(String nom, String prenom, String mdp, String pseudo)
			throws RemoteException {
		super();
		this.nom = nom;
		this.prenom = prenom;
		this.mdp = mdp;
		this.pseudo = pseudo;
	}

	protected Client() throws RemoteException {
		super();
	}

	private String nom;
	private String prenom;
	private String mdp;
	private String pseudo;
	

	public String getNom() {
		return nom;
	}

	public void setNom(String nom) {
		this.nom = nom;
	}

	public String getPrenom() {
		return prenom;
	}

	public void setPrenom(String prenom) {
		this.prenom = prenom;
	}

	public String getMdp() {
		return mdp;
	}

	public void setMdp(String mdp) {
		this.mdp = mdp;
	}

	public String getPseudo() {
		return pseudo;
	}

	public void setPseudo(String pseudo) {
		this.pseudo = pseudo;
	}
//	
//	public boolean equals(Object other)
//	{
//	   if (! (other instanceof Client))
//	   {
//	      return false;
//	   }
//	   Client tmp = (Client) other;
//	   if(tmp.getPseudo().equals(this.getPseudo()))
//		   return true;
//	   return false;
//	}
//	
//	public int hashCode(){ 
//	  	 if (this.pseudo != null){ 
//	    	 return this.pseudo.hashCode(); /*1*/ 
//	  	 } 
//	  	 else { 
//	    	 return super.hashCode(); /*2*/ 
//	  	 } 
//	}
}
